﻿<UserControl x:Class="GUI.Tabs.MainTab"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:Custom="clr-namespace:GUI.Custom_Classes"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="455" d:DesignWidth="929"
             >
    <DockPanel>

        <DockPanel 
                DockPanel.Dock="Left"
                LastChildFill="True">

            <StackPanel Name="sp"
                    DockPanel.Dock="Top"
                    Grid.Column="0">

                <Button 
                        Name="Startup_and_Record" 
                        Height="50"
                        Margin="3, 3, 3, 1.5" >
                    Start Application
                </Button>

                <Button 
                        Name="Window_Selector" 
                        ClickMode="Press"
                        Height="50"
                        Margin="3, 1.5, 3, 1.5" >
                    Select Window
                </Button>

                <Button 
                        Name="Record_Button" 
                        ClickMode="Release" 
                        Height="50"
                        Margin="3, 1.5, 3, 1.5">
                    Record Button
                </Button>
                <StackPanel 
                        Orientation="Horizontal"
                        HorizontalAlignment="Center">
                    <Button 
                        Name="Compile_Test_Button" 
                        Height="50"
                        Width="107"
                        Margin="3, 1.5, 3, 1.5">
                        Compile As Test
                    </Button>
                    <Button 
                        Name="Compile_Demo_Button" 
                        Height="50"
                        Width="107"
                        Margin="3, 1.5, 3, 1.5"
                        >
                        Compile As Demo
                    </Button>
                </StackPanel>
                <StackPanel 
                        Orientation="Horizontal"
                        HorizontalAlignment="Center">
                    <Button 
                        Name="Run_Test_Button" 
                        Height="50" 
                        Width="107"
                        Margin="3, 1.5, 3, 3" 
                        >
                        Run Test
                    </Button>
                    <Button 
                        Name="Run_Demo_Button" 
                        Height="50" 
                        Width="107"
                        Margin="3, 1.5, 3, 3" 
                        >
                        Run Demo
                    </Button>
                </StackPanel>

                <Separator
                        Margin="0, 0, 0 , 3" 
                        BorderThickness="2" 
                        BorderBrush="Gray" />

                <StackPanel 
                        Orientation="Horizontal"
                        HorizontalAlignment="Center">

                    <Button 
                            Name="Save_Script_Button" 
                            Height="50" 
                            Width="71"
                            Margin="0, 0, 3, 3"
                            >
                        Save
                    </Button>

                    <Button 
                            Name="Load_Script_Button" 
                            Height="50" 
                             Width="71"
                            Margin="0, 0, 3, 3"
                            >
                        Load
                    </Button>

                    <Button
                            Name="Clear_Script_Button" 
                            Height="50" 
                             Width="71"
                            Margin="0, 0, 0, 3"
                            >
                        Clear
                    </Button>

                </StackPanel>

                <StackPanel
                        
                        Orientation="Horizontal">

                    <Button 
                            Name="Add_Button" 
                            Height="50" 
                            Width="108"
                            Margin="3, 0, 3, 3"
                            >
                        Add Event
                    </Button>

                    <Button 
                            Name="Remove_Button" 
                            Height="50"
                            Width="108"
                            Margin="0, 0, 3, 3"
                            >
                        Remove Event
                    </Button>

                </StackPanel>

                <Separator
                        Margin="0, 0, 0 , 3" 
                        BorderThickness="2" 
                        BorderBrush="Gray" />

            </StackPanel>

            <Border 
                    MinHeight="95" 
                    BorderThickness="2" 
                    IsHitTestVisible="False" 
                    BorderBrush="Black" 
                    DockPanel.Dock="Bottom"
                    Margin="3, 0, 3, 3">
                <TextBlock Name="Current_Target_Info" Background="WhiteSmoke" MaxWidth="215" />
            </Border>

        </DockPanel>

        <DockPanel Name="DP1">
            <StackPanel Orientation="Vertical" DockPanel.Dock="Left">
                <Expander 
                    Name="ScriptViewer_Expander"
                    DockPanel.Dock="Right"
                    ExpandDirection="Right" 
                    IsExpanded="True">

                    <DockPanel Name="SVDP">
                        <ScrollViewer 
                            CanContentScroll="True" 
                            VerticalScrollBarVisibility="Hidden">
                            <ListBox
                                Name="ScriptViewerLineNums"
                                Width="40"
                                Height="430"
                                ScrollViewer.HorizontalScrollBarVisibility="Hidden" 
                                ScrollViewer.VerticalScrollBarVisibility="Hidden"
                                ScrollViewer.ScrollChanged="Script_Viewer_ScrollChanged"
                                IsHitTestVisible="False">
                            </ListBox>
                        </ScrollViewer>

                        <ScrollViewer
                            Name="ScriptViewerBar"
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            ScrollViewer.VerticalScrollBarVisibility="Auto"
                            ScrollViewer.ScrollChanged="Script_Viewer_ScrollChanged"
                            >
                            <Custom:ScriptViewer 
                                DockPanel.Dock="Left" 
                                MinWidth="650"
                                MaxWidth="650"
                                Height="430"
                                x:Name="Script_Viewer" 
                                AllowDrop="True"
                                ScrollViewer.ScrollChanged="Script_Viewer_ScrollChanged">
                            </Custom:ScriptViewer>
                        </ScrollViewer>
                    </DockPanel>

                </Expander>
                <StackPanel
                    DockPanel.Dock="Bottom"
                    Orientation="Horizontal"
                    HorizontalAlignment="Center">

                    <Button 
                        Name="CreatePrecond_Button" 
                        Height="25" 
                        Width="120"
                        Margin="0, 8, 3, 3">
                        Create Precondition
                    </Button>

                    <Button 
                        Name="CreateAction_Button" 
                        Height="25" 
                        Width="110"
                        Margin="3, 8, 0, 3">
                        Create Implication
                    </Button>

                    <!--<Button
                        Name="CreateCons_Button" 
                        Height="25" 
                        Width="120"
                        Margin="3, 8, 0, 3">
                        Create Consequence
                    </Button>-->
                </StackPanel>
            </StackPanel>

        </DockPanel>

    </DockPanel>


</UserControl>
